package com.xlf.common.core.exception.auth;

import com.xlf.common.core.constant.HttpStatus;
import org.springframework.security.core.AuthenticationException;

import static com.xlf.common.core.enums.StatusCodeEnum.USERNAME_NOT_EXIST;


/**
 * 从数据库查出的用户状态异常。
 */
public class DaoAuthUserDetailsException extends AuthenticationException {

    /**
     * 错误码
     */
    private Integer code;


    public DaoAuthUserDetailsException(String msg) {
        super(msg);
        this.code = HttpStatus.ERROR;
    }

    public DaoAuthUserDetailsException(String msg, Integer code) {
        super(msg);
        this.code = code;
    }
}
